home *** CD-ROM | disk | FTP | other *** search
-
-
-
- gggglllluuuuPPPPeeeerrrrssssppppeeeeccccttttiiiivvvveeee((((3333GGGG)))) OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee gggglllluuuuPPPPeeeerrrrssssppppeeeeccccttttiiiivvvveeee((((3333GGGG))))
-
-
-
- NNNNAAAAMMMMEEEE
- gggglllluuuuPPPPeeeerrrrssssppppeeeeccccttttiiiivvvveeee - set up a perspective projection matrix
-
-
- CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
- void gggglllluuuuPPPPeeeerrrrssssppppeeeeccccttttiiiivvvveeee( GLdouble _f_o_v_y,
- GLdouble _a_s_p_e_c_t,
- GLdouble _z_N_e_a_r,
- GLdouble _z_F_a_r )
-
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- _f_o_v_y Specifies the field of view angle, in degrees, in the _y
- direction.
-
- _a_s_p_e_c_t Specifies the aspect ratio that determines the field of view in
- the _x direction. The aspect ratio is the ratio of _x (width) to _y
- (height).
-
- _z_N_e_a_r Specifies the distance from the viewer to the near clipping plane
- (always positive).
-
- _z_F_a_r Specifies the distance from the viewer to the far clipping plane
- (always positive).
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- gggglllluuuuPPPPeeeerrrrssssppppeeeeccccttttiiiivvvveeee specifies a viewing frustum into the world coordinate
- system. In general, the aspect ratio in gggglllluuuuPPPPeeeerrrrssssppppeeeeccccttttiiiivvvveeee should match the
- aspect ratio of the associated viewport. For example, aspect = 2.0 means
- the viewer's angle of view is twice as wide in _x as it is in _y. If the
- viewport is twice as wide as it is tall, it displays the image without
- distortion.
-
- The matrix generated by gggglllluuuuPPPPeeeerrrrssssppppeeeeccccttttiiiivvvveeee is multipled by the current
- matrix, just as if ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx were called with the generated matrix.
- To load the perspective matrix onto the current matrix stack instead,
- precede the call to gggglllluuuuPPPPeeeerrrrssssppppeeeeccccttttiiiivvvveeee with a call to ggggllllLLLLooooaaaaddddIIIIddddeeeennnnttttiiiittttyyyy.
-
- Given _f defined as follows:
-
- f = cotangent( 2fovy____)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- gggglllluuuuPPPPeeeerrrrssssppppeeeeccccttttiiiivvvveeee((((3333GGGG)))) OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee gggglllluuuuPPPPeeeerrrrssssppppeeeeccccttttiiiivvvveeee((((3333GGGG))))
-
-
-
- The generated matrix is
-
-
-
-
- (||||||( 000aspectf______ 00f0 -1zNear-zFarzFar+zNear__________00 0zNear-zFar2*zFar*zNear____________00 )||||||)
- NNNNOOOOTTTTEEEESSSS
- Depth buffer precision is affected by the values specified for _z_N_e_a_r and
- _z_F_a_r. The greater the ratio of _z_F_a_r to _z_N_e_a_r is, the less effective the
- depth buffer will be at distinguishing between surfaces that are near
- each other. If
-
- r = zNearzFar_____
-
- roughly logr bits of depth buffer precision are lost. Because r
- approaches infinity as _z_N_e_a_r approaches 0, _z_N_e_a_r must never be set to 0.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ggggllllFFFFrrrruuuussssttttuuuummmm, ggggllllLLLLooooaaaaddddIIIIddddeeeennnnttttiiiittttyyyy, ggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx, gggglllluuuuOOOOrrrrtttthhhhoooo2222DDDD
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-